package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;
import javax.swing.table.AbstractTableModel;

import controlador.ControladorVentanaLinea;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VentanaLinea extends javax.swing.JFrame {
	private JPanel pnlinea;
	private JLabel jLabel1;
	private JLabel jLabel2;
	private JButton jButton1;
	private JLabel lbl;
	private JTextField jTxtclasificacion;
	private JTextField jTxtnumerolinea;
	private JLabel lbclasificacion;

	/**
	* Auto-generated main method to display this JFrame
	*/
	
	
	public VentanaLinea() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			BorderLayout thisLayout = new BorderLayout();
			getContentPane().setLayout(thisLayout);
			{
				pnlinea = new JPanel();
				getContentPane().add(pnlinea, BorderLayout.CENTER);
				pnlinea.setBounds(5, 0, 385, 270);
				pnlinea.setLayout(null);
				pnlinea.setBackground(new java.awt.Color(255,255,255));
				pnlinea.setPreferredSize(new java.awt.Dimension(414, 277));
				{
					jLabel1 = new JLabel();
					pnlinea.add(jLabel1);
					jLabel1.setText("Informacion de linea");
					jLabel1.setBounds(113, 17, 223, 22);
					jLabel1.setFont(new java.awt.Font("Bitstream Charter",0,20));
				}
				{
					jLabel2 = new JLabel();
					pnlinea.add(jLabel2);
					jLabel2.setText("Numero de linea:");
					jLabel2.setBounds(85, 72, 124, 15);
				}
				{
					lbclasificacion = new JLabel();
					pnlinea.add(lbclasificacion);
					lbclasificacion.setText("Nombre:");
					lbclasificacion.setBounds(85, 128, 100, 15);
				}
				{
					jButton1 = new JButton();
					pnlinea.add(jButton1);
					jButton1.setBounds(139, 219, 97, 22);
					jButton1.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagen/Boton_Guardar2.jpg")));
					jButton1.setFocusable(false);
					jButton1.setRolloverIcon(new ImageIcon(getClass().getClassLoader().getResource("imagen/Boton_Guardar.jpg")));
					jButton1.setSize(93, 31);
					jButton1.setActionCommand("Guardar");
					jButton1.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
				}
				{
					jTxtnumerolinea = new JTextField();
					pnlinea.add(jTxtnumerolinea);
					jTxtnumerolinea.setBounds(221, 69, 75, 22);
					jTxtnumerolinea.setEnabled(false);
				}
				{
					jTxtclasificacion = new JTextField();
					pnlinea.add(jTxtclasificacion);
					jTxtclasificacion.setBounds(221, 121, 169, 22);
				}
				{
					lbl = new JLabel();
					BorderLayout lblLayout = new BorderLayout();
					pnlinea.add(lbl);
					lbl.setLayout(null);
					lbl.setBounds(0, 27, 48, 278);
					lbl.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagen/fondo7.jpg")));
				}
			}
			pack();
			this.setSize(439, 306);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	public void agregarListener(ActionListener accion) {

		jButton1.addActionListener(accion);
	
	}

	

	public void mostrarMensaje(String mensaje) {
		JOptionPane.showMessageDialog(this, mensaje);
	}

	public String getjTxtclasificacion() {
		return jTxtclasificacion.getText();
	}

	public void setjTxtclasificacion(JTextField jTxtclasificacion) {
		this.jTxtclasificacion = jTxtclasificacion;
	}

	public String getjTxtnumerolinea() {
		return jTxtnumerolinea.getText();
	}

	public void setjTxtnumerolinea(String numero) {
		this.jTxtnumerolinea.setText(numero);
	}

	
}
